﻿using System;
using System.Drawing;
using RRRSRoguelike.Enums;
using RRRSRoguelike.Helpers.Visualizer;
using RRRSRoguelike.Managers;

namespace RRRSRoguelike.Screens
{
    /// <summary>
    /// Takes a text and displays it then waits for key press.
    /// </summary>
	class TextScreen:Screen
    {
        string text;
        Panel mainPanel;

        public TextScreen(string text):base()
        {
            PanelList.Add(new Panel(new Point(4,3), Visualizer.GetScreenWidth() - 9, Visualizer.GetScreenHeight() - 6));
            mainPanel = PanelList[0];
            this.text = text;
        }

        public override void Show()
        {
            Clear();

        ////This was to help check if the installer is grabbing the correct version.
        //#if DEBUG
        //Console.WriteLine("Configuration: Debug");
        //#else
        //Console.WriteLine("Configuration: Release");
        //#endif


            this.mainPanel.Write(text,0, ConsoleColor.White,TextAlignment.Multi);

            mainPanel.Draw();
            
            ApplicationManager.Instance.SoundManager.PlaySound(SoundList.Pluck.ToString());

            WaitKey();
        }
    }
}
